package com.pro.framework.api.enums;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Schema(description = "尺寸单位")
@Getter
@AllArgsConstructor
public enum EnumSizeUnit implements IEnumStr, IEnumSizeUnit {

    MM("毫米", "mm", 1.0),
    CM("厘米", "cm", 10.0),
    M("米", "m", 1000.0),
    INCH("英寸", "in", 25.4),//inches
    FT("英尺", "ft", 304.8),

    ;
    private final String label;

    @Schema(description = "单位符号")
    private final String symbol;

    @Schema(description = "该单位等于多少毫米")
    private final double inMillimeters;

    @Override
    public EnumSizeUnit getUnit() {
        return this;
    }

    @Override
    public Integer getDecimalSize() {
        return 3;
    }
}
